<%--
  Created by IntelliJ IDEA.
  User: dongcheng
  Date: 2019/4/30
  Time: 21:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page import="java.util.Map" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>user</title>
    <link href="css/bootstrap.css" rel='stylesheet' type='text/css' />
    <!-- jQuery (necessary JavaScript plugins) -->
    <script src="js/jquery.min.js"></script>
    <!-- Custom Theme files -->
    <link href="css/dashboard.css" rel="stylesheet">
    <link href="css/style.css" rel='stylesheet' type='text/css' />
    <link rel="stylesheet" type="text/css" href="css/userInfo.css">

    <!-- Custom Theme files -->
    <!--//theme-style-->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="keywords" content="Curriculum Vitae Responsive web template, Bootstrap Web Templates, Flat Web Templates, Andriod Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyErricsson, Motorola web design" />
    <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
    <link href='http://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Varela+Round' rel='stylesheet' type='text/css'>
    <!-- start menu -->

    <style type="text/css">

        .button-show{
            width: 120px;
            height: 18px;
            margin-top: 25px;
            padding: 0 15px;
            background: #000000; /* browsers that don't support rgba */
            background: rgba(45,45,45,.15);
            -moz-border-radius: 6px;
            -webkit-border-radius: 6px;
            border-radius: 6px;
            border: 1px solid #3d3d3d; /* browsers that don't support rgba */
            border: 1px solid rgba(255,255,255,.15);
            -moz-box-shadow: 0 2px 3px 0 rgba(0,0,0,.1) inset;
            -webkit-box-shadow: 0 2px 3px 0 rgba(0,0,0,.1) inset;
            box-shadow: 0 2px 3px 0 rgba(0,0,0,.1) inset;
            font-family: 'PT Sans', Helvetica, Arial, sans-serif;
            font-size: 14px;
            color: #fff;
            text-shadow: 0 1px 2px rgba(0,0,0,.1);
            -o-transition: all .2s;
            -moz-transition: all .2s;
            -webkit-transition: all .2s;
            -ms-transition: all .2s;
        }
    </style>
</head>
<body>
<%
    Map<String,String> login2 = (Map<String, String>)session.getAttribute("login2");
    String path=null;
    path="images/"+login2.get("img");
    if(path.equals("images/null")&&login2!=null)path="images/user.png";

%>
<div class="col-sm-3 col-md-2 sidebar">


    <div class="sidebar_top">
        <h1><%

            if(login2!=null)out.println(login2.get("name"));

        %></h1>
        <div class="show1">
        <div id="headImg">
                <img src=<%out.println(path);%>>
                <span class="changeImg">修改头像</span>

        </div>
        </div>
    </div>
    <div class="uploadImg-box">
        <img src="images/x.png">
        <h3>修改头像</h3>
        <div class="box-min">
            <form action="uploadServlet" enctype="multipart/form-data" method="post">
                <div class="form-group">
                    <input id="lefile" type="file" style="display:none" name="headfile" >
                    <div class="input-append">
                        <input id="photoCover" class="form-control" type="text"  name="headfileTemp">
                        <a class="btn btn-info btn-sm showbtn" onclick="$('input[id=lefile]').click();">Browse</a>
                    </div>
                </div>
                <div class="form-group" style="margin-top: 40px;">
                    <button type="submit" class="btn btn-primary btn-block">上    传</button>
                </div>
            </form>
        </div>
    </div>
    <div class="details">
        <p>(提示：点击头像可修改)</p>
        <h3>作者学号:</h3>
        <p>201741412124</p>
        <h3>作者姓名:</h3>
        <p>利牧</p>
        <address>
            <h3>学校：</h3>
            <span>东莞理工学院</span>

        </address>

    </div>
    <div class="clearfix"></div>
</div>
<!---->
<link href="css/popuo-box.css" rel="stylesheet" type="text/css" media="all"/>
<script src="js/jquery.magnific-popup.js" type="text/javascript"></script>
<!---//pop-up-box---->

<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
    <div class="content">
        <div class="details_header">
            <ul>
                <li><a href=" /logoutServlet"><span class="glyphicon glyphicon-stop" aria-hidden="true"></span>exit</a></li>

                <script>

                    $(document).ready(function(){
                        //上传图片框
                        $('input[id=lefile]').change(function() {
                            $('#photoCover').val($(this).val());
                        });

                        //修改头像
                        $("#headImg").hover(function () {
                            $("#headImg").css("cursor","pointer");
                            $("#headImg img").css("opacity","0.7");
                            $("#headImg span").css("display","inline");
                        },function () {
                            $("#headImg img").css("opacity","1");
                            $("#headImg span").css("display","none");
                        });

                        $("#headImg").click(function () {
                            $(".uploadImg-box").show();
                            $(".container").css("opacity","0.4");
                            $(".uploadImg-box").css("opacity","1");
                        });

                        $(".uploadImg-box img").click(function () {
                            $(".uploadImg-box").hide();
                            $(".container").css("opacity","1");
                        });
                    });
                </script>
            </ul>
        </div>
        <div class="company">
            <h3 class="clr1">莞工绑定信息</h3>
            <a href="/login/dgut"><button class="button-show">更改绑定信息</button></a>
            <div class="company_details">
                <%

                    if(login2 != null)
                    {
                        out.println("学号:"+login2.get("bid")+"<br>");
                        out.println("姓名:"+login2.get("bname")+"<br>");
                        out.println("类别:"+login2.get("type")+"<br>");
                        out.println("学院:"+login2.get("faculty_title")+"<br>");

                    }
                %>

            </div>
        </div>
        <div class="skills">
            <h3 class="clr2">本地个人信息</h3>
            <div class="company_details">
              <%
                  if(login2 != null)
                  {
                      out.println("本地id:"+login2.get("id")+"<br>");
                      out.println("本地昵称:"+login2.get("name")+"<br>");
                      out.println("邮箱:"+login2.get("email")+"<br>");

                  }

              %>
            </div>
        </div>


    </div>

</div>

<!---->
</body>
</html>
